import java.util.Scanner;

//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
public class p1428 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[]arr= new int[n+1];
        for(int i=1;i<=n;i++){
            arr[i] = scanner.nextInt();
        }

        for(int i=1;i<=n;i++) {
            int cnt = 0;
            for (int j = 1; j <= i; j++) {
                if (arr[j] < arr[i]) {
                    cnt++;
                }
            }
            System.out.print(cnt + " ");
        }
    }
}
